package com.youpai.platform.biggod.service.mapper;


import com.youpai.platform.biggod.service.entity.po.BigGodPO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @time: 2022/11/16
 * @author: huanghao
 * @description: 大神mapper
 */
@Repository
public interface BigGodMapper{

    //新增大神
    public Integer add(BigGodPO bigGodPO);

    //更新大神
    public Integer update(BigGodPO bigGodPO);

    // 冻结/解冻大神
    public Integer freezeGod(
            @Param(value = "uid") Long uid,
            @Param(value = "freeze") Integer freeze);

    //通过UID获取大神信息
    public BigGodPO get(Long uid);

    //通过名称获取类别信息
    public List<BigGodPO> getByName(
            @Param(value = "keyword") String keyword,
            @Param(value = "freeze") Integer freeze,
            @Param(value = "offset") Integer offset,
            @Param(value = "length") Integer length);

    // 数据条数
    public Integer countItem(
            @Param(value = "keyword") String keyword,
            @Param(value = "freeze") Integer freeze);

    //删除大神列表
    public Integer remove(
            @Param(value = "uidList") List<Long> uidList);

    //从数据库中物理删除，仅用于测试
    public Integer delete(Long uid);

}



